package reflex.learning01;

/**
 * @program JavaBase
 * @description:
 * @author: zhanglu
 * @create: 2019-06-07 10:25:00
 */
public class Person {

    private String name;

    private Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Person() {
    }

    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String show(){
        String s = "name:" + this.name + " -> age:" + this.age;
        System.out.println(s);
        return s;
    }

    private String show(String name){
        String s = "name:" + name + " -> age:" + this.age;
        System.out.println(s);
        return s;
    }

}
